
#ifndef _APDU_LIB_DEV_OPT_H_
#define _APDU_LIB_DEV_OPT_H_

#include "../apdu.def/apdu_datatypes.h"
#include "../apdu.def/apdu_defs.h"
	
#ifdef __cplusplus
extern "C" {
#endif

	int app_set_label(HANDLE devHandle, char * label);

	int app_set_serial_number(HANDLE devHandle, char * serialNumber);

	int app_get_dev_info(HANDLE devHandle, unsigned char * dev_info, int info_len);

	int app_get_dev_short_info(HANDLE devHandle, unsigned char * dev_info, int info_len);

	int app_gen_random(HANDLE devHandle, unsigned char * random, int len);

	int app_gen_remote_unlock_request(HANDLE devHandle, unsigned char * random, int len);

	int app_dev_auth( HANDLE devHandle, unsigned char algo, unsigned char * auth_data, int data_len );
	
	int app_change_dev_auth_key( HANDLE devHandle, int algo, 
									unsigned char * secure_new_auth_key, int data_len);

	int app_change_dev_auth_key_ex( HANDLE devHandle, unsigned char * new_auth_key, int data_len);

	int app_transmit(HANDLE devHandle, unsigned char * command, int command_len, 
			unsigned char * response, int * response_len);

	int app_dev_format( HANDLE devHandle, cosDevInfo * devInfo, unsigned char devAuthKey[32], 
			int retryTimes, int leftTimes, int isHighLevel);

	int app_dev_get_max_fscaps(HANDLE devHandle, int * fsCaps);

	int app_dev_get_raw_hwsn(HANDLE devHandle, unsigned char * sn, int * sn_len);

	int app_dev_erase_firmware(HANDLE devHandle);

	int app_dev_get_dev_status(HANDLE devHandle, int * sts_format);

	int app_write_oem_info(HANDLE devHandle, int offset, unsigned char * info, int info_len);

	int app_read_oem_info(HANDLE devHandle, int offset, unsigned char * info, int * info_len);

	int app_sys_led_control(HANDLE devHandle, int state, int interval);

	int app_dev_lock_cos( HANDLE devHandle, unsigned char * password, int len);


#ifdef __cplusplus
}
#endif

#endif
